package com.GUI;

import com.Algorithm.Variant;
import com.Entity.Employee;
import java.net.URL;
import java.util.List;
import java.util.ResourceBundle;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;
import javafx.stage.Stage;

/**
 *
 * @author Prezes
 */
public class ResultController implements Initializable {
    
    private Stage dialogStage;
    private List<Variant> result;
    @FXML
    private Label winnerNameLabel;
    @FXML
    private Label winnerSurnameLabel;
    @FXML
    private Label secondLabel;
    @FXML
    private Label thirdLabel;

    public List<Variant> getResult() {
        return result;
    }

    public void setResult(List<Variant> result) {
        this.result = result;
    }
    
    public void setDialogStage(Stage dialogStage) {
        this.dialogStage = dialogStage;
    }
    
    public void initialize() {
        winnerNameLabel.setText(result.get(0).getEmployee().getName().toUpperCase());
        winnerSurnameLabel.setText(result.get(0).getEmployee().getSurname().toUpperCase());
        secondLabel.setText("2. " + result.get(1).getEmployee().getName() + " " + result.get(1).getEmployee().getSurname());
        thirdLabel.setText("3. " + result.get(2).getEmployee().getName() + " " + result.get(2).getEmployee().getSurname());
    }
    
    @Override
    public void initialize(URL url, ResourceBundle rb) {
        
    }
    
}
